The present invention relates generally to an image information processing and encoding apparatus which compresses and expands image data, and, more particularly, to an apparatus which provides high compression of image data and a shortening of the image processing time.
FIG. 1 is a block diagram of an encoder/decoder 91 which is used in an image processing system, such as a digital still camera. The encoder/decoder 91 receives image data output from an image pickup device (not shown) like a CCD (Charge-Coupled Device), and performs a coding and compressing process on the image data in accordance with a predetermined standard or system (e.g., the JPEG system) to generate compressed image data. At the time the compressed image data is displayed on a display unit (not shown) like an LCD, the encoder/decoder 91 performs a decoding and expanding process on the compressed image data to reproduce the image data.
The encoder/decoder 91 has a DCT (Discrete Cosine Transform) section 92, a quantizer 93, a code/decode retriever 94, a packing section 95, a DCT coefficient buffer 96 and first and second buffers 97a and 97b. The image data is segmented into a plurality of blocks each including 8.times.8 pixel data. The image data is input to the DCT section 92 in a block by block manner. The DCT section 92 receives one block of image data and performs an orthogonal transform, such as a two-dimensional discrete cosine transform (DCT), on the block of image data to produce DCT coefficient data. The DCT section 92 stores the generated DCT coefficient data into the DCT coefficient buffer 96, and sends the quantizer 93 a signal indicating an end of the image data transform.
In response to the end signal, the quantizer 93 receives one block of DCT coefficient data from the DCT coefficient buffer 96 and divides that block of DCT coefficient data by quantization coefficient data, stored in the first buffer 97a, to generate quantized data.
The code/decode retriever 94 has a Huffman table 98 where plural pieces of Huffman code data are stored. The code/decode retriever 94 receives quantized data from the quantizer 93 and searches the Huffman table 98 to convert the quantized data to variable-length code data.
The packing section 95 receives blocks of the variable-length code data from the code/decode retriever 94, and generates fixed-length code data of a predetermined bit length. The fixed-length code data is suitable for compressed image data to be input to, and output from, a memory in the predetermined bit length.
A controller 90, such as a CPU, controls the encoder/decoder 91 to carry out a two-pass process, which generates fixed-length code data twice for one screen of image data. Specifically, the controller 90 generates second quantization coefficient data to determine an optimal compression rate for image data based on the amount of one screen of fixed-length code data that has been produced in the first pass, and stores it in the second buffer 97b. In the second pass, the quantizer 93 receives DCT coefficient data from the DCT section 92 via the DCT coefficient buffer 96 and generates quantized data using the second quantization coefficient data.
As the image data is compressed at the optimal compression rate in the second pass, the amount of one screen of fixed-length code data generated in the second pass is smaller than that generated in the first pass. This technique ensures a greater image data compression rate, which contributes to reducing the capacity requirement of the memory that stores the compressed image data. In other words, the number of compressed images storable in the memory is increased.
The DCT section 92, the quantizer 93 and the code/decode retriever 94 execute compression processing on the image data in a block by block manner through a pipeline operation in order to shorten the speed of processing of one screen of image data. When the quantizer 93 is quantizing the first block of DCT coefficient data, for example, the DCT section 92 generates the second block of DCT coefficient data following the first block.
The time required for the second-pass process however affects the operability of, for example, a digital still camera. A digital camera is capable of executing a compression process for one screen after completing compression of the previous one screen of image data. That is, after compression is finished, the next image pickup is possible. Longer compression time results in a longer image pickup interval, which deteriorates the operability of the camera.
Accordingly, it is a primary objective of the present invention to provide an image information processing apparatus and an encoding apparatus having a decreased compression processing time while maintaining a high compression rate.